<?php

declare(strict_types=1);

namespace App\DTO\Request;

use Hyperf\ApiDocs\Annotation\ApiModelProperty;
use Hyperf\DTO\Annotation\Validation\Between;
use Hyperf\DTO\Annotation\Validation\Required;
use Hyperf\DTO\Annotation\Validation\Str;
use Hyperf\DTO\Annotation\Validation\Max;
use Hyperf\DTO\Annotation\Validation\Json;
use Hyperf\DTO\Annotation\Validation\Integer;
use Hyperf\DTO\Annotation\Validation\Size;

class PopupFormData
{
    #[ApiModelProperty('数据版本号')]
    #[Str]
    #[Required]
    #[Max(20)]
    public string $data_version;

    #[ApiModelProperty('数据')]
    #[Json]
    #[Required]
    #[Between(1,1000)]
    public string $data;

    #[ApiModelProperty('时间戳')]
    #[Integer]
    #[Required]
    public int $timestamp;

    #[ApiModelProperty('签名')]
    #[Str]
    #[Required]
    #[Size(32)]
    public string $sign;
}